const iconfontVersion = ["element", "1899140_q2epecy071", "2622139_pxb6qz4dy8"];
const iconfontUrl = "/cdn/iconfont/font_$key/iconfont.css";

// 动态加载阿里云字体库
iconfontVersion.forEach((ele) => {
  loadStyle(iconfontUrl.replace("$key", ele));
});

/**
 * 动态插入css
 */
function loadStyle(url: string) {
  const link = document.createElement("link");
  link.type = "text/css";
  link.rel = "stylesheet";
  link.href = url;
  const head = document.getElementsByTagName("head")[0];
  head.appendChild(link);
}
